package com.haozhiyan.zhijian.myDao;

import java.util.Map;

import org.greenrobot.greendao.AbstractDao;
import org.greenrobot.greendao.AbstractDaoSession;
import org.greenrobot.greendao.database.Database;
import org.greenrobot.greendao.identityscope.IdentityScopeType;
import org.greenrobot.greendao.internal.DaoConfig;

import com.haozhiyan.zhijian.bean.workfg.WorkPlotBean;
import com.haozhiyan.zhijian.bean.workfg.WorkProjectBean;
import com.haozhiyan.zhijian.bean.biaoduan.BiaoDuanBean;
import com.haozhiyan.zhijian.bean.biaoduan.InspectionOneBean;
import com.haozhiyan.zhijian.bean.biaoduan.InspectionTwoBean;
import com.haozhiyan.zhijian.bean.biaoduan.TowerBean;
import com.haozhiyan.zhijian.bean.biaoduan.UnitBean;
import com.haozhiyan.zhijian.bean.xcjc.XCJCSaveBean;

import com.haozhiyan.zhijian.myDao.WorkPlotBeanDao;
import com.haozhiyan.zhijian.myDao.WorkProjectBeanDao;
import com.haozhiyan.zhijian.myDao.BiaoDuanBeanDao;
import com.haozhiyan.zhijian.myDao.InspectionOneBeanDao;
import com.haozhiyan.zhijian.myDao.InspectionTwoBeanDao;
import com.haozhiyan.zhijian.myDao.TowerBeanDao;
import com.haozhiyan.zhijian.myDao.UnitBeanDao;
import com.haozhiyan.zhijian.myDao.XCJCSaveBeanDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see org.greenrobot.greendao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig workPlotBeanDaoConfig;
    private final DaoConfig workProjectBeanDaoConfig;
    private final DaoConfig biaoDuanBeanDaoConfig;
    private final DaoConfig inspectionOneBeanDaoConfig;
    private final DaoConfig inspectionTwoBeanDaoConfig;
    private final DaoConfig towerBeanDaoConfig;
    private final DaoConfig unitBeanDaoConfig;
    private final DaoConfig xCJCSaveBeanDaoConfig;

    private final WorkPlotBeanDao workPlotBeanDao;
    private final WorkProjectBeanDao workProjectBeanDao;
    private final BiaoDuanBeanDao biaoDuanBeanDao;
    private final InspectionOneBeanDao inspectionOneBeanDao;
    private final InspectionTwoBeanDao inspectionTwoBeanDao;
    private final TowerBeanDao towerBeanDao;
    private final UnitBeanDao unitBeanDao;
    private final XCJCSaveBeanDao xCJCSaveBeanDao;

    public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        workPlotBeanDaoConfig = daoConfigMap.get(WorkPlotBeanDao.class).clone();
        workPlotBeanDaoConfig.initIdentityScope(type);

        workProjectBeanDaoConfig = daoConfigMap.get(WorkProjectBeanDao.class).clone();
        workProjectBeanDaoConfig.initIdentityScope(type);

        biaoDuanBeanDaoConfig = daoConfigMap.get(BiaoDuanBeanDao.class).clone();
        biaoDuanBeanDaoConfig.initIdentityScope(type);

        inspectionOneBeanDaoConfig = daoConfigMap.get(InspectionOneBeanDao.class).clone();
        inspectionOneBeanDaoConfig.initIdentityScope(type);

        inspectionTwoBeanDaoConfig = daoConfigMap.get(InspectionTwoBeanDao.class).clone();
        inspectionTwoBeanDaoConfig.initIdentityScope(type);

        towerBeanDaoConfig = daoConfigMap.get(TowerBeanDao.class).clone();
        towerBeanDaoConfig.initIdentityScope(type);

        unitBeanDaoConfig = daoConfigMap.get(UnitBeanDao.class).clone();
        unitBeanDaoConfig.initIdentityScope(type);

        xCJCSaveBeanDaoConfig = daoConfigMap.get(XCJCSaveBeanDao.class).clone();
        xCJCSaveBeanDaoConfig.initIdentityScope(type);

        workPlotBeanDao = new WorkPlotBeanDao(workPlotBeanDaoConfig, this);
        workProjectBeanDao = new WorkProjectBeanDao(workProjectBeanDaoConfig, this);
        biaoDuanBeanDao = new BiaoDuanBeanDao(biaoDuanBeanDaoConfig, this);
        inspectionOneBeanDao = new InspectionOneBeanDao(inspectionOneBeanDaoConfig, this);
        inspectionTwoBeanDao = new InspectionTwoBeanDao(inspectionTwoBeanDaoConfig, this);
        towerBeanDao = new TowerBeanDao(towerBeanDaoConfig, this);
        unitBeanDao = new UnitBeanDao(unitBeanDaoConfig, this);
        xCJCSaveBeanDao = new XCJCSaveBeanDao(xCJCSaveBeanDaoConfig, this);

        registerDao(WorkPlotBean.class, workPlotBeanDao);
        registerDao(WorkProjectBean.class, workProjectBeanDao);
        registerDao(BiaoDuanBean.class, biaoDuanBeanDao);
        registerDao(InspectionOneBean.class, inspectionOneBeanDao);
        registerDao(InspectionTwoBean.class, inspectionTwoBeanDao);
        registerDao(TowerBean.class, towerBeanDao);
        registerDao(UnitBean.class, unitBeanDao);
        registerDao(XCJCSaveBean.class, xCJCSaveBeanDao);
    }
    
    public void clear() {
        workPlotBeanDaoConfig.getIdentityScope().clear();
        workProjectBeanDaoConfig.getIdentityScope().clear();
        biaoDuanBeanDaoConfig.getIdentityScope().clear();
        inspectionOneBeanDaoConfig.getIdentityScope().clear();
        inspectionTwoBeanDaoConfig.getIdentityScope().clear();
        towerBeanDaoConfig.getIdentityScope().clear();
        unitBeanDaoConfig.getIdentityScope().clear();
        xCJCSaveBeanDaoConfig.getIdentityScope().clear();
    }

    public WorkPlotBeanDao getWorkPlotBeanDao() {
        return workPlotBeanDao;
    }

    public WorkProjectBeanDao getWorkProjectBeanDao() {
        return workProjectBeanDao;
    }

    public BiaoDuanBeanDao getBiaoDuanBeanDao() {
        return biaoDuanBeanDao;
    }

    public InspectionOneBeanDao getInspectionOneBeanDao() {
        return inspectionOneBeanDao;
    }

    public InspectionTwoBeanDao getInspectionTwoBeanDao() {
        return inspectionTwoBeanDao;
    }

    public TowerBeanDao getTowerBeanDao() {
        return towerBeanDao;
    }

    public UnitBeanDao getUnitBeanDao() {
        return unitBeanDao;
    }

    public XCJCSaveBeanDao getXCJCSaveBeanDao() {
        return xCJCSaveBeanDao;
    }

}
